using System;
using System.Collections.Generic;
using Db4objects.Db4o;

namespace SharedObjects
{
	public enum MissionCategory
	{
		Espionage,
		Sabotage,
		Fixing,
		Heist,
		Investigation
	}

	public enum MissionType
	{
		StealDeliverFile = 1,
		DeleteFile = 1,

		StealDeleteDeliverFile = 2,
		StealSabotageDeliverFile = 2,

		CreateCriminalRecord = 3,
		DeleteCriminalRecord = 3,

		CreateSocSecRecord = 4,
		SetSocSecToDeceased = 4,

		StealDNA = 5,
		StealFingerprint = 5,

		DeleteAllFiles = 6,
		SabotageSystem = 6,
	}

	/// <summary>
	/// This is a preset class for available mission descriptions. A number of those will be in the clean database, and will be used by the generator.
	/// </summary>
	public class MissionTextPreset : EntityBase
	{
		public string TitleFormatText { get; set; }
		public string ShortDescFormatText { get; set; }
		public string LongDescFormatText { get; set; }
		public MissionType MissionType { get; set; }
	}

	public class MissionPreset : EntityBase
	{
		public MissionCategory Category { get; set; }
		public MissionType Type { get; set; }
		public uint MinDifficulty { get; set;}
		public uint MaxDifficulty { get; set; }
		public List<MissionObjective> Objectives { get; set; }
	}

	/// <summary>
	/// This object serves as preliminary mission information. Instances of this will be created on-the-fly when the user requests a list of missions
	/// via the mission ui.
	/// </summary>
	public class MissionOffer : EntityBase
	{
		public string Title { get; set; }
		public string ShortDescription { get; set; }
		public string LongDescription { get; set; }
		public int Difficulty { get; set; }
		public MissionType Type { get; set; }

		public static MissionOffer CreateRandom(IObjectContainer db, int difficulty)
		{
			return null;
		}
	}

	/// <summary>
	/// Note: the Mission object will be created once the agent accepts a mission.
	/// </summary>
	public class Mission : EntityBase
	{
		public ulong AgentId { get; set; }
		public int Difficulty { get; set; }
		public ulong ObjectiveComputerSystemId { get; set; } //this is set if the mission requires (and has) an instanced CS for this mission
		public MissionType Type { get; set; }
		public List<MissionObjective> Objective { get; set; }
		public ulong CompletionComputerSystemId { get; set; } //this is set if the mission requires a file to be uploaded to finish the mission, etc
	}
}